package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendCalendarAddDTO;
import org.jsola.hr.dto.AttendCalendarUpdateDTO;
import org.jsola.hr.query.AttendCalendarQuery;
import org.jsola.hr.vo.AttendCalendarListVO;
import org.jsola.hr.vo.AttendCalendarVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤日历")
public interface IAttendCalendarControllerAPI {

    /**
     * 新增考勤日历
     * @param attendCalendarAddDTO 考勤日历新增实体
     * @return 考勤日历展示对象
     */
    @ApiOperation(value = "新增考勤日历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarAddDTO", dataType = "AttendCalendarAddDTO", value = "新增考勤日历", paramType = "body")
    })
    Result<AttendCalendarVO> save(AttendCalendarAddDTO attendCalendarAddDTO);


    /**
     * 修改考勤日历
     * @param attendCalendarUpdateDTO 考勤日历
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤日历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarUpdateDTO", dataType = "AttendCalendarUpdateDTO", value = "修改考勤日历", paramType = "body")
    })
    Result<Integer> update(AttendCalendarUpdateDTO attendCalendarUpdateDTO);




    /**
     * 删除单个考勤日历，彻底删除
     * @param attendCalendarId 考勤日历id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤日历，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarId", dataType = "String", value = "考勤日历id", paramType = "path")
    })
    Result<Integer> delete(String attendCalendarId);


    /**
     * 批量删除考勤日历，彻底删除
     * @param attendCalendarIds 考勤日历id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤日历，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarIds", dataType = "String[]", value = "考勤日历id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendCalendarIds);


    /**
     * 根据考勤日历id查询考勤日历详情
     * @param attendCalendarId 考勤日历id
     * @return 考勤日历详情
     */
    @ApiOperation(value="根据考勤日历id查询考勤日历详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarId", dataType = "String", value = "考勤日历id", paramType = "path")
    })
    Result<AttendCalendarVO> findById(String attendCalendarId);


    /**
     * 查询考勤日历
     * @param attendCalendarQuery 考勤日历查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤日历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarQuery", dataType = "AttendCalendarQuery", value = "考勤日历查询参数", paramType = "query")
    })
    Result<List<AttendCalendarListVO>> listAll(AttendCalendarQuery attendCalendarQuery);


     /**
     * 分页查询考勤日历
     * @param attendCalendarQuery 考勤日历查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤日历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendCalendarQuery", dataType = "AttendCalendarQuery", value = "考勤日历查询参数", paramType = "query")
    })
    Result<Page<AttendCalendarListVO>> page(AttendCalendarQuery attendCalendarQuery);


}

